#include "TimeLen.h"
class TimePoint{
private:
	/*core data*/
	int year;
	int mon;
	int day;
	int hour;
	int min;
	int sec;
public:
	/*构造函数*/
	TimePoint();
	TimePoint(time_t t);
	TimePoint(const char *s);
	TimePoint(const string &s);
	
	/*set函数*/
	void set(time_t t);
	void set(const char *s);
	void set(const string &s);
	
	/*类型转换函数*/
	explicit operator time_t()const;
	explicit operator string()const;
	
	/*时间加减*/
	TimePoint operator +(time_t tlen);
	TimePoint operator -(time_t tlen);
	TimePoint operator +(TimeLen tlen);
	TimePoint operator -(TimeLen tlen);
	time_t operator -(TimePoint b);
	
	/*辅助函数*/
	int get_wday();
};

